<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<title>在组件的根元素上监听一个原生事件</title>
	<script src="vue.js"></script>
</head>
<body>
<div id="app">
  <app-component @click.native="numChange"></app-component>
  <p>{{ number }}</p>
</div>
<script>
  Vue.component('app-component', {
      template: '<button>单击增加1</button>',
    })
  var vm=new Vue({
      el: '#app',
      data:{
        number:0
      },
      methods:{
        numChange(){
          this.number++;
       }
     }
  })
</script>
</body>
</html>
